package com.lindom.pojo;

public class User {

    private String name;

    public User(){
        System.out.println("无参构造方法被创建！");
    }

    public User(String name){
        this.name = name;
        System.out.println("有参构造方法被创建！"+ name);
    }

    public void show(){
        System.out.println("name= "+name);
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
